package com.gdut;

import java.util.Scanner;

public class demo9 {
    public static void main(String[] args) {
        String str1 = "abc";
        char[] arr = {'a', 'b', 'c'};
        String str2 = new String(arr);
        boolean result = str1.equals(str2);
        System.out.println(result);
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        for (int i = 0; i < str.length(); i++) {
            System.out.print(str.charAt(i)+ " ");
        }
        System.out.println();
        String beginNum = str.substring(0, 3);
        String endNum = str.substring(7, 11);
        System.out.println(beginNum + "****" + endNum);
        String[] sensitiveWord = {"cnm", "sb", "nm", "草拟吗", "你奶奶的", "傻逼", "CNM", "SB", "NM"};
        for (String s : sensitiveWord) {
            str = str.replace(s, "***");
        }
        System.out.println(str);
    }
}
